package com.ruiysoft.service.sys.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruiysoft.entity.sys.SysShopPayPlatform;
import com.ruiysoft.mapper.sys.SysShopPayPlatformMapper;
import com.ruiysoft.service.sys.ISysShopPayPlatformService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author huazengguang
 * @since 2018-11-22
 */
@Service
public class SysShopPayPlatformServiceImpl extends ServiceImpl<SysShopPayPlatformMapper, SysShopPayPlatform> implements ISysShopPayPlatformService {
    @Resource
    SysShopPayPlatformMapper sysShopPayPlatformMapper;

    @Override
    public SysShopPayPlatform selectShopPayPlatformByAppId(String appId) {

        return sysShopPayPlatformMapper.selectOne(new QueryWrapper<SysShopPayPlatform>().eq("app_id",appId));
    }
//    @Override
//    public SysShopPayPlatform selectShopPayPlatformByShopId(Long shopId) {
//       // SysShopPayPlatform sysShopPayPlatform = sysShopPayPlatformMapper.selectOne(new SysShopPayPlatform().setShopId(shopId));
//
//        SysShopPayPlatform payPlatform = sysShopPayPlatformMapper.selectOne(new SysShopPayPlatform().setShopId(shopId));
//        if (null == payPlatform){
//            payPlatform = sysShopPayPlatformMapper.selectById(1).setShopId(shopId);
//        }
////        payPlatform.setShopId(microShop.getId());
//        return payPlatform;
////        if (null == sysShopPayPlatform){
////            return selectShopPayPlatformByShopId((long)0);
////        }
////        return sysShopPayPlatform;
//    }
}
